home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
061-070
/
amok63
/
m2ced
/
txt.lha
/
Config.mod
< prev
next >
Wrap
Text File
|
1991-11-13
|
2KB
|
92 lines
(**********************************************************************
:Program. Config.mod
:Contents. Configuration of M2CED
:Author. Steffen Reith
:Address. Hessenstr. 64, D-8700 Wuerzburg
:Phone. None
:Copyright. Shareware
:Language. Modula-2
:Translator. M2Amiga A+L V3.2d
:Imports. req,Msg
:History. V1.0 18.June 1990
:History. V1.1 6 Nov. 1990
**********************************************************************)
(*$ StackParms:=FALSE Volatile:=FALSE CaseChk:=FALSE *)
(*$ StackChk:=FALSE RangeChk:=FALSE OverflowChk:=FALSE NilChk:=FALSE *)
IMPLEMENTATION MODULE Config;
FROM DosD IMPORT FileHandlePtr,oldFile,newFile;
FROM DosL IMPORT Open,Close,Read,Write;
FROM SYSTEM IMPORT ADR,ADDRESS;
FROM Msg IMPORT TitleMsg;
FROM req IMPORT PathType;
CONST Restart='S:M2CED.restart';
PROCEDURE ReadConfig(VAR Parameters:P); (* Prg-configuration lesen *)
VAR Dummy:LONGINT;
File:FileHandlePtr;
BEGIN
File:=Open(ADR(ConfigFile),oldFile);
IF File#NIL THEN
Dummy:=Read(File,ADR(Parameters),SIZE(P));
Close(File)
ELSE
WITH Para DO
Window:=WindowDefault;
ContMsg:=ContMsgDefault;
CompilerName:=CompilerNameDefault;
LinkerName:=LinkerNameDefault;
OptimizerName:=OptimizerNameDefault;
compileN:=compileDefault;
linkN:=linkDefault;
startN:=startDefault;
optN:=optDefault;
loadN:=loadDefault;
findErrorN:=findErrorDefault;
cancelN:=cancelDefault;
continueN:=continueDefault
END
END
END ReadConfig;
PROCEDURE WriteFile(VAR File:PathType;OffSet:LONGINT);
VAR FileHandle:FileHandlePtr;
Dummy:LONGINT;
BEGIN
FileHandle:=Open(ADR(Restart),newFile);
IF FileHandle#NIL THEN
Dummy:=Write(FileHandle,ADR(File),SIZE(PathType));
Dummy:=Write(FileHandle,ADR(OffSet),SIZE(OffSet));
Close(FileHandle)
ELSE
TitleMsg('Kann Restartfile nicht schreiben')
END
END WriteFile;
PROCEDURE ReadFile (VAR File:PathType;VAR OffSet:LONGINT);
VAR FileHandle:FileHandlePtr;
Dummy:LONGINT;
BEGIN
FileHandle:=Open(ADR(Restart),oldFile);
IF FileHandle#NIL THEN
Dummy:=Read(FileHandle,ADR(File),SIZE(PathType));
Dummy:=Read(FileHandle,ADR(OffSet),SIZE(OffSet));
Close(FileHandle)
ELSE
TitleMsg('Kann Restartfile nicht finden')
END
END ReadFile;
BEGIN
ReadConfig(Para);
END Config.